<template>
  <div>
    <child02 :text="text" :count="count" v-if="isLoad"/>
  </div>
</template>

<script>
import child02 from './child02'
export default {
  provide () {
    let parent = {}
    setTimeout(() => {
      Object.defineProperty(parent, 'value', {
        get: () => this.text,
        enumerable: true
      })
      this.isLoad = true
    }, 1000)
    return {
      parent
    }
  },
  data () {
    return {
      text: '父组件的值',
      count: {
        name: 'haa'
      },
      isLoad: false
    }
  },
  mounted () {
  },
  components: {
    child02
  }
}
</script>

<style scoped>
</style>
